using System;

namespace BusinessIntelligenceToolkit.Demo
{
    public class HistoryItem
    {
        public string Number { get; set; }

        public DateTime DateTime { get; set; }

        public Weather Weather { get; set; }

        public override string ToString()
        {
            return Number;
        }

        public override bool Equals(object obj)
        {
            return base.Equals(obj);
        }

        public bool Equals(HistoryItem other)
        {
            if (ReferenceEquals(null, other))
            {
                return false;
            }

            if (ReferenceEquals(this, other))
            {
                return true;
            }

            return Equals(other.Number, Number);
        }

        public override int GetHashCode()
        {
            return Number != null ? Number.GetHashCode() : 0;
        }
    }
}